package com.ky.user.listener;


import com.ky.common.config.RabbitKeyConfig;
import com.ky.common.param.MqMsg;
import com.ky.user.strategy.StrategyFactory;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * --- 天道酬勤 ---
 *
 * @author 1379
 * @date 2024/6/5
 * @desc -- 代码敲烂 月薪过万--
 */
@Component
public class SmsRabbitListener {




    @Autowired
    private StrategyFactory strategyFactory;

    @RabbitListener(queues = RabbitKeyConfig.Q_SENDSMS)
    public void smsListener(MqMsg msg){
        strategyFactory.doMqMsg(msg);
    }
}
